import { exInputNumber, exInput, exSelect } from '@ve/common/components/extension'

export default {
  VERSION: '20220408',
  type: 'uiFlop',
  name: '翻牌器',
  icon: 'checkbox-blank-line',
  svg: 'fanpaiqi',
  //数据别名
  // dataName: 'uiFlexbox_data',
  //扩展
  extension: {
    requestSet: {
      type: 'exRequestSet',
      name: '接口配置',
      value: {
        api: '/wms/wms-web',
        method: 'wms.screen.query.test',
        getDataKey: 'wms.screen.query.test',
        loopRequest: false,
        loopTime: 3000,
        nameKey: '',
        valueKey: '',
        busList: [],
        dataObj: {},
        isJson: false,
        data: [
          { key: '#LIMIT#', value: '1' },
          { key: '#PAGE_SIZE#', value: '10' },
        ],
        resList: [
          {
            name: 'EDITWHO',
            id: '翻牌器',
            value: 'QTY',
          },
        ],
      },
    },
    boxHeight: exInputNumber('高度', 50, 1, 500),
    numLength: exInputNumber('固定位数', 0, 0, 10),
    topMargin: {
      type: 'exInputNumber',
      name: '上外边距',
      value: 0,
    },
    rightMargin: {
      type: 'exInputNumber',
      name: '右外边距',
      value: 0,
    },
    bottomMargin: {
      type: 'exInputNumber',
      name: '下外边距',
      value: 0,
    },
    leftMargin: {
      type: 'exInputNumber',
      name: '左外边距',
      value: 0,
    },
    backgroundColor: {
      type: 'exSetChartColor',
      name: '背景颜色',
      value: 'rgba(173, 59, 208, 1)',
    },
    // countValue: exInput('内容', '12345'),
    cardWidth: exInputNumber('卡片宽度', 50, 1, 500),
    cardheight: exInputNumber('卡片高度', 50, 1, 500),
    boderWeight: exInputNumber('卡片线宽', 1, 1, 500),
    boderColor: {
      type: 'exSetChartColor',
      name: '卡片线色',
      value: 'rgba(173, 59, 208, 1)',
    },
    boderType: exSelect('卡片线类型', 'solid', [
      {
        label: '直线',
        value: 'solid',
      },
      {
        label: '虚线',
        value: 'dashed',
      },
    ]),
    duration: exInputNumber('动画时间', 1000, 1, 10000),
    prefix: exInput('前缀', ''),
    suffix: exInput('后缀', ''),
    letterSpacing: exInputNumber('间距', 10, 0, 500),
    borderRadius: exInputNumber('圆角', 10, 0, 500),
    titleFontSize: {
      type: 'exInputNumber',
      name: '字体大小',
      value: 12,
    },
    titleColor: {
      type: 'exSetChartColor',
      name: '字体颜色',
      value: '#fff',
    },
    titleFontWeight: exSelect('字体粗细', 500, [
      {
        label: '正常',
        value: 500,
      },
      {
        label: '加粗',
        value: 600,
      },
      {
        label: '特粗',
        value: 700,
      },
    ]),
    justifyAlign: {
      type: 'exRadioGroup',
      name: '水平位置',
      value: 'center',
      list: [
        {
          label: '居左',
          value: 'start',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居右',
          value: 'end',
        },
      ],
    },
    itemsAlign: {
      type: 'exRadioGroup',
      name: '垂直方向',
      value: 'center',
      list: [
        {
          label: '居上',
          value: 'start',
        },
        {
          label: '居中',
          value: 'center',
        },
        {
          label: '居下',
          value: 'end',
        },
      ],
    },
  },
  list: [],
}
